package com.wuwei.elearning.question.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.wuwei.elearning.question.domain.AudioQuestion;
import com.wuwei.elearning.question.mapper.AudioQuestionMapper;
import com.wuwei.elearning.utils.result.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;


@RestController
@RequestMapping("/elearning/audioQuestion")
public class AudioQuestionController {

    @Resource
    private AudioQuestionMapper audioQuestionMapper;

    @GetMapping("getAudioQuestionByName/{name}")
    public Result<AudioQuestion> getAudioQuestionByName(@PathVariable("name") String name){
        AudioQuestion audioQuestion = audioQuestionMapper.mySelectOne(name);
        return Result.ok(audioQuestion);
    }

}
